package com.yingsheng.bi.hks.dto.addr;

import com.yingsheng.bi.hks.dto.HksTransReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 修改收件地址
 */
@ApiModel(value = "地址修改请求体")
@Data
public class AddrModReq extends HksTransReq {

    @ApiModelProperty(value = "地址标识",required = true)
    @NotBlank
    private String id;

    @ApiModelProperty(value = "地址类型",required = true,notes = "家庭住址、公司地址、收货地址、服务地址")
    @NotBlank
    private String type;

    @ApiModelProperty(value = "联系人",required = true)
    @NotBlank
    private String name;

    @ApiModelProperty(value = "联系号码",required = true)
    @NotBlank
    @Pattern(regexp = "^[1][34578][0-9]{9}$", message = "手机号码格式不正确")
    private String phone;

    @ApiModelProperty(value = "经度",required = true)
    @NotBlank
    private String longitude;

    @ApiModelProperty(value = "纬度",required = true)
    @NotBlank
    private String latitude;

    @ApiModelProperty(value = "省份",required = true)
    @NotBlank
    private String province;

    @ApiModelProperty(value = "城市",required = true)
    @NotBlank
    private String city;

    @ApiModelProperty(value = "地区",required = true)
    @NotBlank
    private String region;

    @ApiModelProperty(value = "地址的第一行",required = true)
    @NotBlank
    private String addrLine1;

    @ApiModelProperty(value = "地址的第一行")
    private String addrLine2;

    @ApiModelProperty(value = "地址标签")
    private String addrTags;

    @ApiModelProperty(value = "默认标识 0是1否,默认传1",required = true)
    private Integer defaultFlg;

    @ApiModelProperty(value = "描述信息")
    private String description;
}
